package com.applcn.shop.repo.repository;

import com.applcn.shop.repo.entity.ShopIdentificationEntity;
import com.applcn.shop.repo.mapper.ShopIdentificationMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

/**
 * com.applcn.shop.repo.repository
 * Description:
 *
 * @author: 大妖怪
 * @date: 2020-04-02 00:40
 */
@Repository
public class ShopIdentificationRepository extends ServiceImpl<ShopIdentificationMapper, ShopIdentificationEntity> {

    /**
     * 查询店铺审核状态
     *
     * @param shopId
     * @return
     */
    public ShopIdentificationEntity getByShopId(Long shopId) {
        return baseMapper.selectOne(
                new QueryWrapper<ShopIdentificationEntity>()
                .lambda()
                .eq(ShopIdentificationEntity::getShopId, shopId)
        );
    }
}
